//
//  DrawTraceLayer.h
//  firebkball
//
//  Created by flydy on 2018/5/14.
//
//

#ifndef DrawTraceLayer_h
#define DrawTraceLayer_h

#include "cocos2d.h"

class DrawTraceLayer : public cocos2d::Layer
{
public:
    cocos2d::DrawNode* drawNode;
    //重力误差比
    float  GErrorRatio = 1.0f;
    float  VErrorRatio = 1.0f;
    //决定轨迹的长度
    int times = 30;
    //决定轨迹点的间隔
    float dtime = 0.02f;
public:
    DrawTraceLayer(){};
    virtual ~DrawTraceLayer(){};
    virtual bool init();
    virtual void onEnter();
    virtual void clearTrace();
    virtual void refreshTraceView(cocos2d::Vec2 sp, cocos2d::Vec2 ep, cocos2d::Vec2 v, cocos2d::Vec2 gravity, float factor);
    
    CREATE_FUNC(DrawTraceLayer);
};

#endif /* DrawTraceLayer_h */
